//
//  TableViewCell.m
//  RSUIScrollView
//
//  Created by thinkjoy on 16/8/28.
//  Copyright © 2016年 Thinkjoy_RS. All rights reserved.
//

#import "TableViewCell.h"
#import "RSImgVScrollView.h"

@interface TableViewCell ()<RSImgVScrollViewDataSource,RSImgVScrollViewDelegate>
@property (weak, nonatomic) IBOutlet RSImgVScrollView *imgVScrollView;

@end

@implementation TableViewCell

+ (instancetype)getTableViewCellWithTableView:(UITableView *)tableView
{
    static  NSString    * ID = @"TableViewCell";
    TableViewCell   * cell  =   [tableView dequeueReusableCellWithIdentifier:ID];
    if (!cell) {
        cell    =   [[NSBundle mainBundle]loadNibNamed:NSStringFromClass(self) owner:nil options:nil].firstObject;
    }
    return cell;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    self.imgVScrollView.delegate    =   self;
    self.imgVScrollView.dataSource  =   self;
    
    // Initialization code
}

- (NSArray *)arrayWithImagesInImgVScrollView:(RSImgVScrollView *)imgVScrollView
{
    //    return nil;
    //    return @[[NSURL URLWithString:@"http://h.hiphotos.baidu.com/zhidao/wh%3D450%2C600/sign=c56b791f19d5ad6eaaac6ceeb4fb15ed/cf1b9d16fdfaaf51e4aec3648e5494eef11f7a9f.jpg"]];
    return @[[NSURL URLWithString:@"http://h.hiphotos.baidu.com/zhidao/wh%3D450%2C600/sign=c56b791f19d5ad6eaaac6ceeb4fb15ed/cf1b9d16fdfaaf51e4aec3648e5494eef11f7a9f.jpg"],[NSURL URLWithString:@"http://www.wndhw.com/renti/oumei/images/om275.jpg"],[NSURL URLWithString:@"http://ww1.sinaimg.cn/mw600/85d79bcbjw1erlanf9f6hj20go0p0goe.jpg"],[NSURL URLWithString:@"http://t2.fansimg.com/uploads2012/03/userid354497time20120325135800at42.jpg"]];
    //    return @[@"http://h.hiphotos.baidu.com/zhidao/wh%3D450%2C600/sign=c56b791f19d5ad6eaaac6ceeb4fb15ed/cf1b9d16fdfaaf51e4aec3648e5494eef11f7a9f.jpg",@"http://www.wndhw.com/renti/oumei/images/om275.jpg",@"http://ww1.sinaimg.cn/mw600/85d79bcbjw1erlanf9f6hj20go0p0goe.jpg"];
}
- (UIViewContentMode)imgVScrollView:(RSImgVScrollView *)imgVScrollView contentModeForImgAtIndex:(NSInteger)index
{
    return UIViewContentModeScaleToFill;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
